/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Pilas_Ejemplo;

import javax.swing.JOptionPane;

/**
 *
 * @author Urii
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        
                    int tam=Integer.parseInt(JOptionPane.showInputDialog("tamaño"));
                    Pila p=new Pila(tam);       

         for(;;)

         {

         byte opc=Byte.parseByte(JOptionPane.showInputDialog("Menu\n1.Insertar dato\n2.Eliminar dato\n3.Llenar Pila\n4.Ver Pila\n5.Salir"));


         
                switch(opc)
                                {
                    case 1:
                        p.Insertar();
                        break;
                    case 2:
                        p.Eliminar();
                        break;
                    case 3:
                        p.llenar();
                        break;
                    case 4:
                        JOptionPane.showMessageDialog(null,""+p.toString());
                        break;
                   case 5:
                       System.exit(5);}

         }

}


    

}